<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>JS2 &raquo; AJAX PortScanner Example</title>
  <link href="style.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../../src/JS2.js"></script>
  <script type="text/javascript">
	function scan() {
		Animation.ChangeOpacity('scanning', 0);
		Animation.ChangeOpacity('scanner-form', 30);
		$s('scanning').display='block';
		Animation.Fader('scanning', 0, 100, 600);
		AJAX.InnerFromAJAX('portscan.php','resultsP','portscanner', 'closescan();');
	}
	function closescan() {
		Animation.ChangeOpacity('scanning', 0);
		document.getElementById('scanning').style.display = 'none';
		Animation.Fader('scanner-form', 30, 100, 400);
	}
  </script>
</head>

<body>

<div id="scanning-container">
  <div id="scanning">
    <p id="s">Scanning...</p>
  </div>
</div>

<div id="scanner-form">
  <form action="portscan.php" method="get" id="portscanner" onsubmit="return false;">
  <div class="the-form">
    <div class="scanner-infobox">
      <p>AJAX Port Scanner</p>
    </div>
    <div class="scanner-holder"> 
      <div class="scanner-left">
        <p>Host:</p>
      </div>
      <div class="scanner-right">
        <p><input type="text" id="host" name="host" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>" /></p>
      </div>
    </div>
    <div class="scanner-holder"> 
      <div class="scanner-left">
        <p>Start Port:</p>
      </div>
      <div class="scanner-right">
        <p><input type="text" id="sport" name="sport" value="21" /></p>
      </div>
    </div>
    <div class="scanner-holder"> 
      <div class="scanner-left">
        <p>End Port:</p>
      </div>
      <div class="scanner-right">
        <p><input type="text" id="eport" name="eport" value="35" /></p>
      </div>
    </div>
    <div id="results">
      <p id="resultsP"></p>
    </div>
    <div class="scanner-button">
      <p><input type="submit" value="Scan" id="scanbtn" onclick="scan();"></p>
    </div>
  </div>
  </form>
</div>


</body>
</html>
